package com.yss.reportworld.domain.kettle;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yss.common.core.annotation.EasyExcel;
import com.yss.common.core.annotation.ExcelValid;
import com.yss.common.core.utils.easyexecl.IntegerConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 采集任务明细（采集任务与采集作业关联）对象 rw_db_etl_job_task_detail
 *
 * @author yss
 * @date 2023-07-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("rw_db_etl_job_task_detail")
public class EtlJobTaskDetail extends Model<EtlJobTaskDetail> {
    public static final String SHEET_NAME = "任务明细";
    /**
     * 技术主键
     */
    @ExcelIgnore
    @TableId("ID")
    private String id;

    /**
     * 采集任务ID
     */
    @ExcelIgnore
    @TableField("TASK_ID")
    private String taskId;

    @ExcelProperty("任务名称")
    @TableField(exist = false)
    @ExcelValid(message = "【任务明细】【任务名称】不能为空")
    private String taskName;

    /**
     * 采集作业ID
     */
    @ExcelIgnore
    @TableField("JOB_ID")
    private String jobId;

    @ExcelProperty("作业名称")
    @ExcelValid(message = "【任务明细】【作业名称】不能为空")
    @TableField(exist = false)
    private String jobName;
    /**
     * 排序
     */
    @ExcelProperty("排序")
    @TableField("ORDER_NUM")
    @ExcelValid(message = "【任务明细】【排序】不能为空")
    private Integer orderNum;

    /**
     * 是否串行
     */
    @ExcelIgnore
    @TableField("IS_SERIAL")
    private Integer isSerial;

    /**
     * 状态 是否启用
     */
    @ExcelProperty(value = "状态", converter = IntegerConverter.class/*, readConverterExp = "0=无效,1=正常"*/)
    @EasyExcel(readConverterExp = "0=无效,1=正常")
    @TableField("STATUS")
    @ExcelValid(message = "【任务明细】【状态】不能为空")
    private Integer status;

    /**
     * 数据库类型
     */
    @ExcelIgnore
    @TableField("RW_DB_DATABASE_TYPE")
    private String rwDbDatabaseType;

    /**
     * 数据编码
     */
    @ExcelIgnore
    @TableField("RW_DB_ID")
    private String rwDbId;
}
